chore: remove --project-id and --org-id references in CLI docs#475
chore: remove --project-id and --org-id references in CLI docs#475LucDeCaf wants to merge 3 commits into
--project-id and --org-id references in CLI docs#475Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
| powersync pull instance --instance-id=<instance-id> | ||
| ``` | ||
|
|
||
| The instance ID identifies the target on its own. The CLI looks up the organization and project from it, so `--org-id` and `--project-id` are not needed. |
There was a problem hiding this comment.
The developer note above is somewhat interesting because it explains that while developers typically only need to pass the instance ID, under the hood project and org ID are automatically looked up and referenced. But overall I wonder how much users actually need to know/care about this? I think mentioning explicitly in a case like this (The CLI looks up the organization and project from it, so --org-idand--project-id are not needed.) that project and org ID are not required is unnecessary and just noise because of a legacy thing? Another way to look at this: what will break if we simply don't mention project and org IDs at all (i.e. they are just an internal params needed for API calls - if my assumption here is true)
This PR in the CLI repo automatically fetches the project and org IDs from the instance ID and converts the project and org ID settings to no-ops (in most cases). The exceptions are
powersync link cloud --create, which creates a new instance and thus has no instance ID to pull from, and project/org IDs defined incli.yaml, which now act as a sort of lazy cache for the CLI to save on repeatedgetInstancecalls.Note: CLI changes are merged but unreleased, will merge this PR once CLI changes are fully released.
AI Usage
Claude Code was used to draft the docs changes, which I reviewed and adjusted.